Honor "Show with initial pose" in step 2 raylib renderer - #520
Open
michalpelka wants to merge 1 commit into
Open
Honor "Show with initial pose" in step 2 raylib renderer#520michalpelka wants to merge 1 commit into
michalpelka wants to merge 1 commit into
Conversation
The GLUT->raylib port of multi_view_tls_registration replaced PointCloud::render() (which branches on show_with_initial_pose) with ScanRenderer, whose draw()/drawTrajectories() only ever render at m_pose. The "Show with initial pose" checkbox therefore had no visible effect on the point clouds or trajectories in step 2 -- it only still influenced observation-picking intersection points and compute_rms(). This affected every session type; it was reported (#517) against E57 import because that's where comparing imported vs. registered poses is the first thing you do. Add a useInitialPose flag to ScanRenderer::draw()/drawTrajectories(). The cached GPU buffers stay baked at m_pose; when the flag is set the per-scan delta (m_initial_pose * m_pose^-1) is folded into the MVP for that scan only -- the same technique drawCachedWithTransform() uses to preview a pose, so no buffer re-upload. The trajectory polyline uses the same MVP fold; the CPU-side overlays (IMU-diff lines, square outlines, orientation crosses) use m_initial_pose directly. The main display() call sites pass session.point_clouds_container.show_with_initial_pose; the loop-closure editor and single-scan preview draw() call sites are left at m_pose. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQ48ovXb5eJap4YZoPXoVd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GLUT->raylib port of multi_view_tls_registration replaced PointCloud::render() (which branches on show_with_initial_pose) with ScanRenderer, whose draw()/drawTrajectories() only ever render at m_pose. The "Show with initial pose" checkbox therefore had no visible effect on the point clouds or trajectories in step 2 -- it only still influenced observation-picking intersection points and compute_rms(). This affected every session type; it was reported (#517) against E57 import because that's where comparing imported vs. registered poses is the first thing you do.
Add a useInitialPose flag to ScanRenderer::draw()/drawTrajectories(). The cached GPU buffers stay baked at m_pose; when the flag is set the per-scan delta (m_initial_pose * m_pose^-1) is folded into the MVP for that scan only -- the same technique drawCachedWithTransform() uses to preview a pose, so no buffer re-upload. The trajectory polyline uses the same MVP fold; the CPU-side overlays (IMU-diff lines, square outlines, orientation crosses) use m_initial_pose directly. The main display() call sites pass session.point_clouds_container.show_with_initial_pose; the loop-closure editor and single-scan preview draw() call sites are left at m_pose.
fixes #517